package com.headingsoft.jxc.domain;

import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
import javax.validation.constraints.Size;
import com.headingsoft.jxc.domain.Employee;
import javax.persistence.ManyToOne;
import java.util.Set;
import java.util.HashSet;
import javax.persistence.ManyToMany;
import javax.persistence.CascadeType;

@RooJavaBean
@RooToString
@RooEntity
public class Warehouse {

    private String name;

    @Size(max = 300)
    private String address;

    @ManyToOne
    private Employee administrator;

    private String tel;

    @Size(max = 300)
    private String description;

    @ManyToMany(cascade = CascadeType.ALL)
    private Set<Employee> members = new HashSet<Employee>();
}
